<template>
  <div>
    <Chart :cdata="cdata" />
  </div>
</template>

<script>
import Chart from "./chart.vue";
import { getPassRate } from '../../../../api/archive'

export default {
  data() {
    return {
      cdata: {
        category: [],
        lineData: [],
        barData: [],
        rateData: [],
      },
    };
  },
  components: {
    Chart,
  },
  mounted() {
    this.setData();
  },
  methods: {
    // 根据自己的业务情况修改
    setData() {
      getPassRate().then((res) => {
        this.cdata.category = res.data.month;
        this.cdata.lineData = res.data.submitCount;
        this.cdata.barData = res.data.auditCount;
        this.cdata.rateData = res.data.passRate;
      });
    },
  },
};
</script>

<style lang="scss" scoped>
</style>